

package com.example.demo.common.convention.errorcode;


public enum BaseErrorCode implements IErrorCode {


    CLIENT_ERROR("A000001", "用户端错误"),
    USER_REGISTER_ERROR("A000100", "用户注册错误"),
    USER_NAME_VERIFY_ERROR("A000110", "用户名校验失败"),
    USER_NAME_EXIST_ERROR("A000111", "用户名已存在"),
    PASSWORD_VERIFY_ERROR("A000120", "密码校验失败"),
    PASSWORD_SHORT_ERROR("A000121", "密码长度不够"),
    JWT_NULL_ERROR("A000122", "用户JWT不存在"),
    IDEMPOTENT_TOKEN_NULL_ERROR("A000200", "二维码失效请重新获取"),
    QRCODE_USED_ERROR("A000201", "二维码已被使用"),
    CAPTCHA_USER_NULL_ERROR("A000202", "验证码已过期"),
    QRCODE_USER_NULL_ERROR("A000203", "二维码已过期"),
    CAPTCHA_USED_ERROR("B000100", "验证码已使用"),
    CAPTCHA_NOT_USED_ERROR("B000100", "验证码未提交"),
    SERVICE_ERROR("B000001", "系统执行出错");



    private final String code;

    private final String message;

    BaseErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
